<%@ page import="java.util.List"%>
<form action="<%=request.getAttribute("searchFormAction")%>" method="post" class="movieform">
    <input name="action" type="hidden" value="search" />
    <div>
        <label>Movie Name:</label>
        <select name="movieName">
            <option value ="(all)">(all)</option>
            <%
                        List<String> listMovieName = (List<String>) session.getAttribute("listMovieName");
                        for (String movieName : listMovieName) {
            %>
            <option value ="<%=movieName%>"><%=movieName%></option>
            <%
                        }
            %>
        </select>
    </div>
    <div>
        <label>Sort By:</label>
        <select name="sortBy">
            <%
                        String[] arrSortBy = (String[]) session.getAttribute("arrSortBy");
                        for (String sortBy : arrSortBy) {
            %>
            <option value ="<%=sortBy%>"><%=sortBy%></option>
            <%
                        }
            %>
        </select>
    </div>

    <div class="button">
        <input type="submit" value="Search" /> <input type="reset"
                                                      value="Reset" />
    </div>
</form>